package com.ymt.bpm.service.platform.fauth;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ymt.bpm.model.POrg;

/**
 * Created by Johnny on 2017/2/15.
 */
public interface FaOrgService {

    JSONArray selectAllByTenant(String tenantId, int timezoneOffset);

    JSONArray selectAllByTenantWithPos(String tenantId, int timezoneOffset);

    String checkName(String tenantId, String parentId, String orgId, String orgName);

    JSONObject save(String tenantid, String loginName, String displayName, POrg org, int timezoneOffset);

    POrg get(String tenantId, String orgId);

    JSONObject del(String tenantId, String loginName, String displayName, String orgId);

    JSONObject usersInOrg(String tenantId, String orgId,
                                         int offset,
                                         int limit,
                                         String sort,
                                         String order);

    JSONObject usersInOrgPos(String tenantId, String orgId, String posId,
                                            int offset,
                                            int limit,
                                            String sort,
                                            String order);

    int addPosition(String tenantId, String loginName, String displayName, String orgId, String posId);

    int deletePosition(String tenantId, String loginName, String displayName, String orgId, String posId);

    JSONObject addPositionUser(String tenantId, String loginName, String displayName, String orgId, String posId, String userId);

    int deleteOrgUser(String tenantId, String loginName, String displayName, String orgId, String userId);

    int deletePositionUser(String tenantId, String loginName, String displayName, String orgId, String posId, String userId);

    String usersInOrgDhx(String tenantId, String orgId, String queryParams,
                    int fInd, int lInd,
                    int timezoneOffset, String lang, String ordercolumns);

}
